package com.baizhi.cmfzmanager.appcontroller;

import com.baizhi.cmfzmanager.entity.Audio;
import com.baizhi.cmfzmanager.service.AudioService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/shouye")
public class AppAudioController {

    @Autowired
    private AudioService audioService;
    @GetMapping("/getAudioByAlbumId/{id}")
    public List<Audio> getAudioByAlbumId(@PathVariable("id") Integer albumId){

        return audioService.getAudioByAlbumId(albumId);
    }
}
